//
//  ZHDataService.h
//  WDFans
//
//  Created by Zhihong Yuan on 2/8/12.
//  Copyright (c) 2012 __MyCompanyName__. All rights reserved.
//

#import <Foundation/Foundation.h>

#import "WDUsers.h"
#import "OAuthEngine.h"

@interface ZHDataService : NSObject
<OAuthEngineDelegate>
{
    OAuthEngine	*engine_;
    WDUsers *loginUser_;
    NSMutableArray *localUsers_;
}
@property (nonatomic, retain)WDUsers *loginUser;
@property (nonatomic, retain)OAuthEngine *engine;
@property (nonatomic, retain) NSMutableArray *localUsers;

+ (BOOL)isLogined;
+ (void)logout;

- (void)saveLocalUsers;

+ (ZHDataService *)sharedService;
- (void)removeCachedOAuthDataForUsername;

+ (NSDictionary *)parseToNewesWithData:(NSData *)data;
+ (BOOL)parseToLoginUserWithData:(NSData *)data;
+ (NSDictionary *)parseToPersonalMessagesWithData:(NSData *)data;
+ (BOOL)setMessageReadSucceed:(NSData *)data;
+ (NSDictionary *)parseToAllProvincesWithData:(NSData *)data;
+ (NSArray *)parseToAllDealersWithData:(NSData *)data;
+ (NSMutableArray *)parseToForumSectionsWithData:(NSData *)data;
+ (NSString *)changeUserInfoWithData:(NSData *)data;
+ (NSMutableDictionary *)parseToThemesWithData:(NSData *)data;
+ (NSMutableDictionary *)parseToThemesDetailWithData:(NSData *)data;


@end
